package com.iplant.basic.service.po.bms;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.iplant.base.po.BasePO;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;

@DBBasePO(TableName = "bms_department", CheckName = {"Code", "Name"}, Schemas = DBSchemas.Basic, CodeAuto = true,
        CodePrefix = "DEPT", CodeNum = 6)
public class BMSDepartment extends BasePO implements Serializable {

    private static final long serialVersionUID = 1L;

    @DBCondition
    @DBField
    public int ParentID = 0;

    public String ParentName = "";

    @DBField
    public List<Integer> ManagerID = new ArrayList<Integer>();

    public String ManagerName = "";

    @DBField
    public int Type = 0;

    @DBField
    public int OrderNum = 0;

    public int ItemCount = 0;

    /**
     * 部门成员数量
     */
    public int EmployeeCount = 0;

    // public List<BMSDepartment> SonList = new ArrayList<>();

//	public BMSDepartment(AdDepartment wAdDepartment) { 
//		this.Name = wAdDepartment.getName();
//		this.Active=wAdDepartment.getActive();
//		this.SonList = new ArrayList<>();
//		for (AdDepartment wDepartment : wAdDepartment.getChildren()) {
//			this.SonList.add(new BMSDepartment(wDepartment));
//		} 
//	}

    public BMSDepartment() {
        this.ID = -1;
        this.Name = "";

        this.Active = 0;
        this.ParentID = 0;
    }

    @JsonProperty("ParentID")
    public int getParentID() {
        return ParentID;
    }

    public void setParentID(int parentID) {
        ParentID = parentID;
    }

    @JsonProperty("ParentName")
    public String getParentName() {
        return ParentName;
    }

    public void setParentName(String parentName) {
        ParentName = parentName;
    }

    @JsonProperty("ManagerName")
    public String getManagerName() {
        return ManagerName;
    }

    public void setManagerName(String managerName) {
        ManagerName = managerName;
    }

    @JsonProperty("Type")
    public int getType() {
        return Type;
    }

    public void setType(int type) {
        Type = type;
    }

    @JsonProperty("OrderNum")
    public int getOrderNum() {
        return OrderNum;
    }

    public void setOrderNum(int orderNum) {
        OrderNum = orderNum;
    }

    @JsonProperty("ManagerID")
    public List<Integer> getManagerID() {
        return ManagerID;
    }

    public void setManagerID(List<Integer> managerID) {
        ManagerID = managerID;
    }

    @JsonProperty("ItemCount")
    public int getItemCount() {
        return ItemCount;
    }

    public void setItemCount(int itemCount) {
        ItemCount = itemCount;
    }

    @JsonProperty("EmployeeCount")
    public int getEmployeeCount() {
        return EmployeeCount;
    }

    public void setEmployeeCount(int employeeCount) {
        EmployeeCount = employeeCount;
    }
}
